#pragma once

#include "Coordinates.h"

namespace HW2{

	struct Point2D
	{
		int x, y;
		Point2D(int x = 0, int y = 0): x(x), y(y) {}
		bool operator<(Point2D &other)
		{
			return x < other.x && y < other.y;
		}

		bool operator>(Point2D &other)
		{
			return x > other.x && y > other.y;
		}
		bool operator==(const Point2D &other) const
		{
			return (x == other.x) && (y == other.y);
		}
		operator size_t () const
		{
			return x + (y << 5);
		}
	
		Coordinates toCoordinates()
		{
			return Coordinates(x,y);
		}
	};

}